package com.example.demo;

import com.example.demo.nacos.ConfigPrinter;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
@EnableDiscoveryClient
@SpringBootApplication
public class DemoApplication {

    @Bean
    public CommandLineRunner run(ConfigPrinter configPrinter) {
        return args -> {
            configPrinter.printConfig();
        };
    }

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

}
